Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small cloudbuster fixes #1279

Merged
merged 8 commits into from
Oct 8, 2024
Merged

Small cloudbuster fixes #1279

merged 8 commits into from
Oct 8, 2024

Conversation

NovemberTang
Copy link
Contributor

@NovemberTang NovemberTang commented Oct 1, 2024

What does this change?

  • Correctly encodes Grafana URL in Anghammarad CTA, skips CTA creation if account name is null
  • Only shows FSBP violations from last 60 days
  • Sends notifications to teams on PROD
  • Fix local execution by loading local .env file

This PR is probably a bit easier to understand commit by commit.

How has it been verified?

  • Local execution works
  • Wrote unit tests to verify new behaviour

@NovemberTang NovemberTang marked this pull request as ready for review October 2, 2024 10:36
@NovemberTang NovemberTang requested review from a team as code owners October 2, 2024 10:36
Remediation: [Documentation](https://example.com)`,
});
});
it('should return nothing if the first observed date is older than the cut-off', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a nice candidate for property-based testing. No need to do it here, but if you're interested to look at doing that together at any point we can drop fast-check into the project and try it out?

packages/cloudbuster/src/digests.test.ts Show resolved Hide resolved
packages/cloudbuster/src/digests.ts Show resolved Hide resolved
return [
{
cta: `View all findings on Grafana`,
url: `https://metrics.gutools.co.uk/d/ddi3x35x70jy8d?var-account_name=${encodeURIComponent(aws_account_name)}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice to pass in the dashboard name as a param to make it easier to parse as a human

Copy link
Contributor Author

@NovemberTang NovemberTang Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand what you mean by dashboard name? Or what would be easier to parse?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant this bit: ddi3x35x70jy8d - maybe we could have a var called fsbpCompliance or somesuch in its place (since it's already a template string) - just to make it easier to see where it goes at a glance? Not that important though!

Copy link
Contributor

@tjsilver tjsilver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@NovemberTang NovemberTang merged commit 115b750 into main Oct 8, 2024
5 checks passed
@NovemberTang NovemberTang deleted the nt/prod-params branch October 8, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants